1. Field of the Invention:
The present invention relates generally to controls for electric motors, and more specifically to a digital electronic controller suitable for use with a stepper motor.
2. Description of the Prior Art:
The construction, control, and use of stepper motors is well known to those skilled in the art. Because of their design, stepper motors are able to accurately position the rotor at multiple known locations. Because of this capability, stepper motors have many uses. For example, they are used to position the platten and print head in electronic typewriters and printers.
Controllers for stepper motors are used to energize the field coil windings in selected sequences to change the position of the armature. Various switching sequences of the different field coil windings are used to give full step and half step positioning of the armature. Stepper motors can also hold the armature in a fixed position. This is typically referred to as detent mode.
Stepper motors typically have 2 independent field coils, but other numbers may be used. For example, it is known to construct stepper motors having 5 field coils. The number of field coils, and the number of armature pole pairs used, determine the angular separation between each full or half step position. For example, a motor having 50 armature pole pairs and 2 field windings may be positioned at 200 different settings in the full step mode. This corresponds to an angular separation of 1.8.degree.. Controlling this same motor in half step mode gives 400 positions, each 0.9.degree. apart.
A schematic representation of a stepper motor and associated control circuitry is shown in FIG. 1. This system is a typical system containing 2 field coils. An armature 10 is driven and positioned through switching of currents through field coils 12 and 14. Field coil 12 is driven through an H-bridge 16 (described below), and coil 14 is driven through H-bridge 18.
As described below, H-bridges 16, 18 contain transistors which are switched on and off appropriately in order to cause current to flow through the field coils 12, 14 in the desired direction. The H-bridges 16, 18 are controlled by controllers 20, 22 respectively. As will be described below, many controller 20, 22 designs require that the current level through the field coils 12, 14 be known. This current is sensed through sense resistors 24, 26 which are low resistance resistors. Voltages developed across resistors 24, 26 are fed into controllers 20, 22 through signal lines 28, 30 respectively.
A schematic diagram of one H-bridge 16 is shown in FIG. 2. Four transistors 32, 34, 36, 38 are connected to the field coil 12 in an H configuration. The collectors of transistors 32 and 36 are connected to a voltage source V.sub.s, and transistors 34 and 38 have their emitters connected to current sense resistor 24. The collectors of transistors 34, 38 and emitters of transistors 32, 36 are connected to the field coil 12. Recirculation diodes 40, 42, 44, 46 are connected in parallel across transistors 32, 34, 36, 38 respectively. It is known to use field effect transistors in place of the bipolar transistors shown in FIG. 2.
In order to cause current to flow from left to right through field coil 12, transistors 32 and 38 are switched on while transistors 34 and 36 are switched off. In order to cause current to flow from right to left through field coil 12, transistors 36 and 34 are turned on while transistors 32 and 38 are turned off. Turning off all four transistors, or at least the upper pair 32, 36 the lower pair 34, 38, cuts off the current supply to the field coil 12. Because energy is stored in the magnetic field of the coil 12, current does not cease flowing instantaneously but decays according to an L/R time constant as known in the art. Recirculation diodes 40, 42, 44, 46 allow current to circulate through a complete path when the transistors are in the OFF state and the magnetic field of the field coil 12 is collapsing, providing protection to the transistors 32-38.
In order to improve stepper motor performance, many controller designs apply a higher voltage to the motor than the field coils 12, 14 are nominally rated for. For example, a 5 volt, 1 amp motor presents a coil resistance of 5 ohms. In order to improve response time of the stepper, 48 volts could be applied as the source voltage V.sub.s. Since currents change in the coils according to L/R time constants, as known in the art, the use of a higher voltage gives a faster motor response. However, it is still necessary to limit current in the motor to the maximum rated value, in this case 1 amp. Simply applying 48 volts to a 5 ohm resistance in the coil would result in a current greater than 9 amps, which would burn out the stepper motor.
The solution most typically adopted is to use a current "chopper" to limit current through the motor to 1 amp. The appropriate transistors 32, 34, 36, 38 are switched on and off by the controller in order to limit current through the coil 12 to the maximum rated value. This switching causes the current to vary slightly, having an average value approximately equal to the current rating of the motor.
Three different controller modes are typically used to perform this current chopping. One approach is to switch the transistors in the H-bridge 16 at a constant frequency, and use a variable duty cycle in order to control the current. A second approach is to vary the switching frequency and have a constant off time for the transistors in the H-bridge. These techniques are usually referred to as pulse-width modulation (PWM), and frequency modulation (FM) respectively. Both of these techniques use the current sensing technique described in connection with FIG. 1. The constant frequency (PWM) technique adjusts the duty cycle in order to limit the coil current to the rated value, while the FM technique simply turns the current off for a fixed time whenever the current reaches the rated value. A third technique uses a fixed frequency and fixed duty cycle, and does not sense the current through the field coils. This technique is often referred to as open loop mode.
One side effect of the switching performed in the controller is the generation of an audible hum if the switching frequency is within those frequencies normally audible to the human ear. Since stepper motors are often used in machinery which operates near humans, the generation of audible sounds would be an irritant which it is important to prevent. In order to ensure that an audible hum is not generated, it is necessary to ensure that the effective switching frequency remains above approximately 20 kHz.
Since the frequency of FM switching varies according to variations in the load and other factors, fixed off time techniques are particularly susceptible to situations in which the switching frequency falls into the audible range. Current designs of FM controllers are not flexible enough to ensure both best operation of the motor/controller combination and the avoidance of generating audible frequency noise.
A problem which occurs with PWM and FM controllers relates to sensing of current through the sense resistor. It is common for noise spikes to be generated during switching, and these can be reflected as a transient current through the sense resistor. When this occurs, the detection circuitry within the controller is often fooled into detecting a high field coil current condition, so that the sensed current through the coil appears to be higher than it actually is. This results in the controller lowering the current through the coil, so that a lower than desired current is actually provided, and typically lowering the effective switching frequency in the coil to within the audible range. This occurs since the current in the coil follows an effective switching frequency of a subharmonic of the desired frequency.
It would be desirable to provide a controller suitable for use with stepper motors which can operate efficiently and flexibly in both an FM mode and an open loop mode. It would further be desirable to provide such a controller which is capable of having its operating parameters programmed by a microprocessor or controller. It would be further desirable to provide such a controller which is resistant to noise which can be reflected across the sense resistor.